Hi Todd,
KFLOP does not normally wait for the encoders to move or be within a tolerance. That could result in erratic motion. It assumes the servo will follow within a tight tolerance or fault with a Following Error.
But you could create a MCode to do this:
#include "KMotionDef.h"
main()
{
//Solenoid on SetBit(26);
// wait until Encoder Position catches
// up with the commanded Destination
while (ch0->Position < ch0->Dest) ;
//Solenoid off
ClearBit(26);
}
This will activate the solenoid, wait until the position is reached, and then disable the solenoid. You might
assign this program to MCode M100 Execute/wait/sync. Then code:
G0 C45 (quickly change the Destination)
M101 (activate solenoid, wait for encoder, disactivate)
HTH
Regards
TK
| Group: DynoMotion |
Message: 8370 |
From: morgtod |
Date: 9/16/2013 |
| Subject: Re: Hydraulic bender |
That's what I was looking for!
I will mock up the system and try it out.
Thanks again,
Todd --- In dynomotion@yahoogroups.com, <tk@...> wrote:
Hi Todd, KFLOP does not normally wait for the encoders to move or be within a tolerance. That could result in erratic motion. It assumes the servo will follow within a tight tolerance or fault with a Following Error. But you could create a MCode to do this: #include "KMotionDef.h" main() { //Solenoid on SetBit(26); // wait until Encoder Position catches // up with the commanded Destination while (ch0->Position < ch0->Dest) ; //Solenoid off ClearBit(26); } This will activate the solenoid, wait until the position is reached, and then disable the solenoid. You might
assign this program to MCode M100 Execute/wait/sync. Then code: G0 C45 (quickly change the Destination) M101 (activate solenoid, wait for encoder, disactivate)
HTH Regards TK
| |